#ifndef UPDATE_H
#define UPDATE_H

#include <QDialog>
#include <QMessageBox>
#include <QFile>
#include <QTcpSocket>
#include <QDataStream>
#include <QProcess>
#include <QDateTime>
#include "updateinfo.h"

namespace Ui {
class Update;
}

class Update : public QDialog
{
    Q_OBJECT

public:
    explicit Update(QWidget *parent = 0);
    ~Update();

private slots:
    void disconnect();
    void communicate();

    QString humanDisplay(int bytes);
private:
    Ui::Update *ui;
    UpdateInfo updateInfo;
    QTcpSocket *clientSocket;
    quint64 nextBlockSize;
    QString version_s;
    int bytesWritten;
};

#endif // UPDATE_H
